<div style="text-align: center;margin-top: 0;padding-top:0;margin-bottom:5px">
  <span style="font-size:18;font-weight:bold;vertical-align:top">Project Name:&nbsp;&nbsp;&nbsp;&nbsp;</span>
  <span style="font-size:24;"><%= truncate(h(@stat.project_name), 90,'...') %></span>
</div>
<div id="sidebar" style="padding-top: 0; margin-top: 0;width: 18em;">
  <div style="padding-top: 0; margin-top: 0;">
    <div style="background-color: #eecc88;font-size:18px;font-weight:bold;margin-top: 0;
         padding-top: 0;
         padding-left: 0.4em;
         padding-bottom: 0.25em;">Project Details</div>
    <div>
      <table style="width: 18em;">
        <tr>
          <td colspan=2 style="text-align:left"><b>Project Directory:</b></td>
        </tr>
        <tr>
          <td colspan=2 style="text-align:left"><%=truncate(h(@stat.project_url), 36, '...') %></td>
        </tr>
        <tr>
          <td colspan=2 style="text-align:left;border-top:thin outset #ccc"><b>Project Homepage:</b></td>
        </tr>
        <tr>
          <td colspan=2 style="text-align:left"><%= if @stat.shared? && @stat.project_homepage_set? && !@stat.project_homepage.blank? then link_to(truncate(h(@stat.project_homepage), 36, '...'), h(@stat.project_homepage)) else truncate(@stat.project_homepage, 36, '...') end%></td>
        </tr>
        <tr style="text-align:left">
          <td style="text-align:left;border-top:thin outset #ccc"><b>Date Uploaded:</b></td>        
          <td style="text-align:right;border-top:thin outset #ccc"><%=h @stat.created_at.strftime('%m/%d/%y at %H:%M') %></td>
        </tr>        
      </table>
    </div>
  </div>
  <div>
    <div style="background-color: #eecc88;font-size:18px;font-weight:bold;margin-top: 0.5em;
         padding-top: 0.25em;
         padding-left: 0.4em;
         padding-bottom: 0.25em;">Tags</div>
    <div style="width: 18em; height: 18em">
      <table>
        <tr>
          <td style="text-align:left">
<style>
 .css1 { font-size: 10px; }
  .css2 { font-size: 12px; }
  .css3 { font-size: 14px; }
  .css4 { font-size: 16px; }
</style>
<div id="tag_cloud_tags">
    <% for tag in @stat.tags %>
      <%= link_to tag.name, :action => 'index', :tags => tag.name %>
    <% end %>  
</div>
          

          </td><td><b>&nbsp;</b></td>
        </tr>
      </table>
    </div>
  </div>

</div>
<div id="mainContent" style="padding-top: 0; margin-top: 0;">
  <div style="padding-top: 0; margin-top: 0;">
    <p style="text-align: center;padding-top: 0; margin-top: 0;">
      <%= ziya_chart(url_for(:action => :show_historical_crap_percent, :id => @stat),
        :bgcolor => "#eecc88", 
        :width => 600, :height => 120, 
        :align => 'center' ) %>
    </p>
    <p style="text-align: center;padding-top: 0; margin-top: 0;">
      <%= ziya_chart(url_for(:action => :show_historical_crap_count, :id => @stat),
        :bgcolor => "#eecc88", 
        :width => 600, :height => 120, 
        :align => 'center' ) %>
    </p>

    <p style="text-align: center;padding-top: 0; margin-top: 0;">
      <%= ziya_chart(url_for(:action => :show_detail, :id => @stat),
        :bgcolor => "#eecc88", 
        :width => 600, :height => 250, 
        :align => 'center' ) %>
    </p>
    <p align="center">
      <!-- end #mainContent -->
    </p>
  </div>
</div>
<div id="comparison_container" style="width:63em;padding-top: 0; margin-top: 0;">
  <div id="sidebar" style="width: 18em;padding-top: 0; margin-top: 0;">
    <div style="background-color: #eecc88;font-size:18px;font-weight:bold;margin-top: 0;
             padding-top: 0;
             padding-left: 0.4em;
             padding-bottom: 0.25em;">Project Comparison</div>
    <div id="comparison_stats" style="width:18em;">
        <%= render :partial => 'comparison_stats', :locals => {:stat => @stat, :avgs =>@avgs, :diffs => @diffs} %>
    </div>
    <div id="comparison_chooser">
        <%= render :partial => 'comparison_chooser', :locals => {:stat => @stat, :flip => false} %>
    </div>
  </div>
  <div id="mainContent">
    <div id="comparison_chart" style="text-align: center;padding-top: 0; margin-top: 0;">
        <%= render :partial => 'comparison_chart', :locals => {:stat => @stat, :tags => nil} %>
    </div>

    <p align="center">
      <!-- end #mainContent -->
    </p>
  </div>
</div>
<!--
  <% if @add_badge %>
    <%= render :partial => 'badge', :stat => @stat %>  
  <% end %>
  -->